package com.redpacketcover.rc.user;

import androidx.lifecycle.MutableLiveData;

import com.redpacketcover.rc.base.BaseResponseBean;
import com.redpacketcover.rc.base.BasicMode;
import com.redpacketcover.rc.bean.GoodsRecord;
import com.redpacketcover.rc.bean.UserBean;
import com.redpacketcover.rc.goods.GoodsApiService;

import java.util.HashMap;
import java.util.List;

import io.reactivex.Observable;

public class UserMode extends BasicMode {


    /**
     * 获取用户信息
     */

    private MutableLiveData<BaseResponseBean<String>> goodsData;

    public MutableLiveData<BaseResponseBean<String>> getUserInfo(HashMap<String, Object> params) {
        if (goodsData == null) {
            goodsData = new MutableLiveData<>();
        }
        UserApiService service = getService(UserApiService.class);
        Observable<BaseResponseBean<String>> observable = service.getUserInfo(params);
        getRequestData(observable, goodsData);
        return goodsData;
    }
}